<%--
  Created by IntelliJ IDEA.
  User: kiyohime
  Date: 2018/9/6
  Time: 9:37
  To change this template use File | Settings | File Templates.
--%>
<%@ page import="com.htdc.web.bean.Agreement" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>


    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script>
        function test() {
            $.ajax({
                url : "/htdc/Agreement/addAgreement",
                type : "GET",
                data : {
                    aid : $("[name='aid']")[0].value,
                    rentTime : $("[name='rentTime']")[0].value,
                    rentEnd : $("[name='rentEnd']")[0].value,
                    cycle : $("[name='cycle']")[0].value,
                    rentPattern : $("[name='rentPattern']")[0].value,
                    rentCash : $("[name='rentCash']")[0].value,
                    price : $("[name='price']")[0].value,
                    freeTime : $("[name='freeTime']")[0].value,
                    growthRate : $("[name='growthRate']")[0].value,
                    pid : $("[name='pid']")[0].value,
                    pTel : $("[name='pTel']")[0].value,
                    rid:$("[name='rid']")[0].value
                },
                dataType : "json",
                success : function() {
                },
                error : function() {
                }
            });
        }
    </script>

</head>
<body>
<h1>主页面</h1>
<td>合同编号 <input type="text" name="aid" value=""></td>
<td>起始时间<input type="text" name="rentTime" value=""></td>
<td>结束时间<input type="text" name="rentEnd" value=""></td>
<td>收款周期<input type="text" name="cycle" value=""></td>
<td>租赁方式<input type="text" name="rentPattern" value=""></td>
<td>保证金<input type="text" name="rentCash" value=""></td>
<td>租赁单价<input type="text" name="price" value=""></td>
<td>免租期<input type="text" name="freeTime" value=""></td>
<td>递增率<input type="text" name="growthRate" value=""></td>
<td>承租人<input type="text" name="pid" value=""></td>
<td>承租人电话<input type="text" name="pTel" value=""></td>
<td>房间号<input type="text" name="rid" value=""></td>

<p>
    <input type="button" name="cl" value="点击测试" onclick="test()">
</p>
</body>
</html>
